<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common.jsp"%>
<html lang="en">
<head>
	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/css/bootstrap-upf.css" rel="stylesheet">
	<link href="${pageContext.request.contextPath}/resource/css/def/ztree/metro.css" rel="stylesheet">
	<link href="${pageContext.request.contextPath}/resource/css/def/frm/sys/sysOrg.css" rel="stylesheet">
	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/validator/bootstrapValidator.css" rel="stylesheet">
	<script	src="${pageContext.request.contextPath}/resource/js/jquery/plugin/jquery.ztree.all-3.5.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/jquery/plugin/My97DatePicker/WdatePicker.js"></script>
	<script src="${pageContext.request.contextPath}/resource/js/bootstrap/validator/bootstrapValidator.js"></script>
	

	<style type="text/css">
		.HdClass{
			display:none;
		}
		.menuTreeCan {
		    border: 1px solid #DDDDDD;
		    overflow: auto;
		    height: 95%;
		    margin-top: 10px;
		    margin-bottom: 10px;
		}
		.borderTable{
			border:1px solid #DDDDDD;
			width:100%
		}
	</style>
	<!-- <script type="text/javascript">
		var zNodes = ${treeArray};
	</script> -->
<script type="text/javascript">

</script>
</head>
<body>
	<div class="body-upf-empty-space" style="height:20px;"></div>
	<div class="container-fluid">
		<div class="col-xs-3 col-md-3" >
				<!-- 机构树面板 -->
				<div class="upfpanel-box">
					<div class="upfpanel-header">
						<h5 class="upfpanel-title"><font style="color:red;">组织机构树</font></h5>
						<div class="upfpanel-toolbar">
							<div class="upfpanel-menu">
	
								<a href="#" title="全部展开" onclick="expandAll();"> <span
									class="glyphicon glyphicon-plus" aria-hidden="true"></span>
								</a> <a href="#" title="全部折叠" onclick="collapseAll();"> <span
									class="glyphicon glyphicon-minus" aria-hidden="true"></span>
								</a> <a href="#" title="刷新" onclick="refreshTree();"> <span
									class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
								</a>
							</div>
						</div>
					</div>
					<!-- end of upfpanel-header -->
	
					<div class="upfpanel-body" id="ztreeDiv" style="overflow:auto;">
						<ul id="tree" class="ztree"></ul>
							<!-- 组织机构树 -->
					</div>
				</div>
				<!-- 机构树面板结束 -->
		</div>
		<div class="col-xs-9 col-md-9">
			<div class="upfpanel-box">
			
				<div class="upfpanel-header">
					<h5 class="upfpanel-title"><font style="color:red;">组织机构详细信息</font></h5>
					<div class="upfpanel-toolbar">
						<div class="upfpanel-menu"></div>
					</div>
				</div><!-- end of upfpanel-header -->

				<div class="upfpanel-body">
					<div class="container-fluid" id="sysOrgObject" style="padding:0px;">
					
					
					<div>
						<div class="col-xs-12" style="text-align: left; padding-right: 5%; height:34px;">
								<!-- #DE5145 -->
								<shiro:hasPermission name="sysOrgController/saveSysOrg">
								<button type="button" class="btn btn-success btnMRc" id="addbtn" 
									onclick="addNewOrgShow()">新增子组织</button>
								</shiro:hasPermission>
								<shiro:hasPermission name="sysOrgController/updateSysOrgOrg">
								<button type="button" class="btn btn-info btnMRc" id="editbtn"
									onclick="updateOrgShow();">修改此组织</button>
								</shiro:hasPermission>
								<shiro:hasPermission name="sysOrgController/delSysOrg">
								<button type="button" class="btn btnMRc" id="deletebtn"
									onclick="delOrgShow();">删除此组织</button>
								</shiro:hasPermission>
								<shiro:hasPermission name="sysOrgController/toSelectOrgUser">
								<button type="button" class="btn btn-success btnMRc" id="selctUser"
									onclick="toSelectOrgUser();">查看员工</button>
								</shiro:hasPermission>
								<shiro:hasPermission name="sysOrgController/toSelectOrgRole">
								<button type="button" class="btn btn-success btnMRc" id="selectRole"
									onclick="toSelectOrgRole();">查看角色</button>
								</shiro:hasPermission>
								<!-- <button class="btn btn-info btnMRc" id="savebtn"
									type="submit" >保&nbsp;&nbsp;&nbsp;&nbsp;存</button> -->
								<!-- <button class="btn btn-info" type="submit" id="updateBtn">
											修&nbsp;&nbsp;&nbsp;&nbsp;改</button> -->
								<!-- <button class="btn btn-info" type="button" id="returnBtn" onclick="returnSysOrg();">
											返&nbsp;&nbsp;&nbsp;&nbsp;回</button> -->
						</div>
					</div>
					
						<div style="height: 38px"></div>
						<div class="col-xs-12 borderTable" >
							<div style="width:100%;">

							<div class="form-horizontal" id="form_horizontal2">
							
							<div style="display:inline">
								<div class="form-group" style="float:left">
									<label class="col-sm-3  control-label no-padding-right"
										for="codeOrgObj2" style="width:120px">组织编码：</label>
									<div class="col-sm-9" id="codeOrgObj2" style="width:250px">
										
									</div>
								</div>
								
								<div class="form-group" style="float:left">
									<label class="col-sm-3  control-label no-padding-right"
										for="nameOrgObj2" style="width:120px">组织名称：</label>
									<div class="col-sm-9" id="nameOrgObj2" style="width:250px">
										
									</div>
								</div>
							</div>
							
							<div style="display:inline">
								<div class="form-group" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="fullNameOrgObj2" style="width:120px">组织全称：</label>
									<div class="col-sm-9" id="fullNameOrgObj2" style="width:250px">
										
									</div>
								</div>
								
								<div class="form-group" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="orgTypeOrgObj2" style="width:120px">组织类型：</label>
									<div class="col-sm-9" id="orgTypeOrgObj2" style="width:250px">
										<!-- <select class="chosen-select col-xs-6 col-sm-4 form-control"
											name="orgType" data-placeholder="选择组织类型">
											<option value="ORG">公司组织</option>
											<option value="DEPT">部门</option>
										</select> -->
									</div>
								</div>
							</div>
							
							<div style="display:inline">
								<div class="form-group" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="orgEmailOrgObj2" style="width:120px">电子邮件：</label>
									<div class="col-sm-9" id="orgEmailOrgObj2" style="width:250px">
										
									</div>
								</div>
								
								<div class="form-group" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="postalcodeOrgObj2" style="width:120px">邮政编码：</label>
									<div class="col-sm-9" id="postalcodeOrgObj2" style="width:250px">
										
									</div>
								</div>
							</div>
							<div style="display:inline">
								<div class="form-group" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="telephonenumberOrgObj2" style="width:120px">办公电话：</label>
									<div class="col-sm-9" id="telephonenumberOrgObj2" style="width:250px">
										
									</div>
								</div>
								
								<div class="form-group" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="facsimiletelephonenumberOrgObj2" style="width:120px">传真号码：</label>
									<div class="col-sm-9" id="facsimiletelephonenumberOrgObj2" style="width:250px">
										
									</div>
								</div>
							</div>
							
							<div style="display:inline">
								<div class="form-group" 
									id="orgStartDateDiv" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="orgStartDateOrgObj2" style="width:120px">生效日期：</label>
									<div class="col-sm-9" id="orgStartDateOrgObj2" style="width:250px">
										
									</div>
								</div>
								
								<div class="form-group" id="managerIdDiv" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										for="managerIdOrgObj2" style="width:120px">管理范围：</label>
									<div class="col-sm-9" id="managerIdOrgObj2" style="width:250px">
									</div>
								</div>
							</div>
							<div style="display:inline">
								<div class="form-group"
									 id="orgControlLevelDiv" style="float:left">
									<label class="col-sm-3 control-label no-padding-right"
										   for="orgStartDateOrgObj2" style="width:120px">组织级别：</label>
									<div class="col-sm-9" id="orgControlLevelOrgObj2" style="width:250px">

									</div>
								</div>
							</div>
							<!-- <div class="form-group" style="display:none" id="isUsingDiv">
								<label class="col-sm-3 control-label no-padding-right" for="isUsingOrgObj2">是否在用</label>
								<div class="col-sm-8" id="isUsingOrgObj2">
									<select class="chosen-select col-xs-6 col-sm-4 form-control" name="isUsing" 
										data-placeholder="是否在用">
										<option value="Y">在用</option>
										<option value="N">失效</option>
									</select>
								</div>
							</div> -->
							<!-- <div class="form-group" style="display: none"
								id="modifyInfoDiv">
								<label class="col-sm-2 control-label no-padding-right"
									for="modifyInfoOrgObj2">变更说明：</label>
								<div class="col-sm-8" id="modifyInfoOrgObj2">
									
								</div>
							</div> -->

							<!-- <div class="clearfix form-group">
								<div class="col-md-offset-3 col-md-9">
									<button class="btn btn-info" type="submit" id="saveBtn">
										保存</button>

									<button class="btn btn-info" type="submit" id="updateBtn">
										修改</button>
								</div>
							</div> -->
						</div>

	<form class="form-horizontal" role="form" id="sysOrgObjectForm" method="post" autocomplete="off" >
								
								
								<fieldset id="contentField" >
									
									<input type="hidden" name="id" id="idOrgObj"> 
									<input type="hidden" name="parentId" id="parentIdOrgObj">
									<input type="hidden" name="currentName" id="currentName"/>
									
									<div style="display:inline">
										<div class="form-group" id="pCodeOrgDiv" style="float:left">
											<label class="col-sm-3 control-label no-padding-right" style="width:120px"
												for="pCodeOrgObj">上级名称：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" id="pCodeOrgObj" placeholder="上级组织名称" 
													class="col-xs-10 col-sm-5 form-control" readonly="readonly">
											</div>
										</div>
										
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="codeOrgObj" style="width:120px">组织编码：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="code" id="codeOrgObj"
													placeholder="组织编码" class="col-xs-10 col-sm-5 form-control" autofocus>
											</div>
										</div>
									</div>
									
									<div style="display:inline">
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="nameOrgObj" style="width:120px">组织名称：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="name" id="nameOrgObj"
													placeholder="组织名称" class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
										
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="fullNameOrgObj" style="width:120px">组织全称：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="fullName" id="fullNameOrgObj"
													placeholder="组织全称" class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
									</div>
									
									<div style="display:inline">
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="orgTypeOrgObj" style="width:120px">组织类型：</label>
											<div class="col-sm-9" style="width:250px">
												<select class="chosen-select col-xs-6 col-sm-4 form-control"
													name="orgType" id="orgTypeOrgObj" data-placeholder="选择组织类型">
													<option value="ORG">公司组织</option>
													<option value="DEPT">部门</option>
												</select>
											</div>
										</div>
										
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="orgEmailOrgObj" style="width:120px">电子邮件：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="email" name="orgEmail" id="orgEmailOrgObj"
													placeholder="电子邮件" class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
									</div>
									
									<div style="display:inline">
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="postalcodeOrgObj" style="width:120px">邮政编码：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="postalcode" id="postalcodeOrgObj"
													placeholder="邮政编码" class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
										
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="telephonenumberOrgObj" style="width:120px">办公电话：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="telephonenumber"
													id="telephonenumberOrgObj" placeholder="办公电话"
													class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
									</div>
									
									<div style="display:inline">
										<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="facsimiletelephonenumberOrgObj" style="width:120px">传真号码：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="facsimiletelephonenumber"
													id="facsimiletelephonenumberOrgObj" placeholder="传真号码"
													class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
										
										<div class="form-group" style="float:left"
											id="orgStartDateDiv">
											<label class="col-sm-3 control-label no-padding-right"
												for="orgStartDateOrgObj" style="width:120px">生效日期：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" id="orgStartDateOrgObj" placeholder="生效日期"
												onfocus="WdatePicker()"	class="col-xs-10 col-sm-5 form-control" readonly="readonly">
											</div>
										</div>
									</div>
									
									<div style="display:inline">
											<div class="form-group" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="orgTypeOrgObj" style="width:120px">组织级别：</label>
											<div class="col-sm-9" style="width:250px">
												<select class="chosen-select col-xs-6 col-sm-4 form-control"
													name="controlLevel" id="controlLevelOrgObj" data-placeholder="选择组织级别">
													<option value="100">集团公司</option>
													<option value="200">省公司</option>
													<option value="300">地市公司</option>
													<option value="400">区县公司</option>
												</select>
											</div>
										</div>
										<div class="form-group" id="managerIdDiv" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="managerIdOrgObj" style="width:120px">管理范围：</label>
											<div class="col-sm-9" style="width:250px">
												<!-- <input type="text" id="managerIdOrgObj" placeholder="管理范围" class="col-xs-10 col-sm-5 form-control" > -->
												<select class="chosen-select col-xs-6 col-sm-4 form-control" 
													id="managerIdOrgObj" data-placeholder="选择组织类型">
													<option value="C">当前组织范围</option>
													<option value="P">上级组织范围</option>
												</select> <input type="hidden" id="managerIdVal" name="managerId">
											</div>
										
										</div>
										<!-- <div class="form-group" style="display:none" id="isUsingDiv">
											<label class="col-sm-3 control-label no-padding-right" for="isUsingOrgObj">是否在用</label>
											<div class="col-sm-6">
												<select class="chosen-select col-xs-6 col-sm-4 form-control" name="isUsing" id="isUsingOrgObj"
													data-placeholder="是否在用">
													<option value="Y">在用</option>
													<option value="N">失效</option>
												</select>
											</div>
										</div> -->
										<div class="form-group" id="modifyInfoDiv" style="float:left">
											<label class="col-sm-3 control-label no-padding-right"
												for="modifyInfoOrgObj" style="width:120px">变更说明：</label>
											<div class="col-sm-9" style="width:250px">
												<input type="text" name="modifyInfo" id="modifyInfoOrgObj"
													placeholder="变更说明" class="col-xs-10 col-sm-5 form-control">
											</div>
										</div>
									</div>
									<!-- <div class="clearfix form-group">
										<div class="col-md-offset-3 col-md-9">
											<button class="btn btn-info" type="submit" id="saveBtn">
												保存</button>

											<button class="btn btn-info" type="submit" id="updateBtn">
												修改</button>
										</div>
									</div> -->
								</fieldset>
			<center>	
			<div class="row">			
				<div class="form-group">		
                        <div class="col-md-6 col-md-offset-3">
                            <button type="submit" class="btn btn-info btnMRc" name="savebtn" id="savebtn">保&nbsp;&nbsp;&nbsp;&nbsp;存</button>
                        	<button class="btn btn-info" type="button" id="returnBtn" onclick="returnSysOrg();">
											返&nbsp;&nbsp;&nbsp;&nbsp;回</button>
                        </div>
                </div>
                <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                            <button type="submit" class="btn btn-info" name="updatebutton" id="updateBtn">修&nbsp;&nbsp;&nbsp;&nbsp;改</button>
                        	<button class="btn btn-info" type="button" id="returnBtn1" onclick="returnSysOrg();">
											返&nbsp;&nbsp;&nbsp;&nbsp;回</button>
                        </div>
                </div>
            
			</div>	
			</center>
		</form>
								
								
							</div><!-- 内容div style="width:60%;" -->
							
							
							
							</div> <!-- class="col-xs-12" -->
							
					</div><!-- 头和内容的div  class="container-fluid" id="sysOrgObject" -->

				</div><!-- upfpanel-body end -->

			</div><!-- class="upfpanel-box" -->

		</div class="col-xs-8 col-md-8">
	</div>

</body>
	<script	src="${pageContext.request.contextPath}/resource/js/frm/sys/sysOrgNew.js"></script>
</html>
